﻿<UserControl xmlns:my="clr-namespace:UI.Web.SL.Demo.SysAdmin.Controls"  
             x:Class="UI.Web.SL.Demo.SysAdmin.MainFrame"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    d:DesignHeight="300" d:DesignWidth="837">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="60"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="22"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel x:Name="TopMenuS" Orientation="Horizontal" Background="{StaticResource HeadBG}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10"></ColumnDefinition>
                    <ColumnDefinition Width="142"></ColumnDefinition>
                    <ColumnDefinition Width="10"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="3"></RowDefinition>
                    <RowDefinition Height="18"></RowDefinition>
                    <RowDefinition Height="18"></RowDefinition>
                    <RowDefinition Height="18"></RowDefinition>
                    <RowDefinition Height="3"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock x:Name="helloBlock" Grid.Column="1" Grid.Row="1" Text="应急监测" />
                <TextBlock x:Name="UserName" Text="Administrator" Grid.Column="1" Grid.Row="2" />
                <TextBlock Text="欢迎使用 应急监测系统" Grid.Column="1" Grid.Row="3" />
            </Grid>
            <Rectangle Width="1" Fill="{StaticResource HeadSplitor}"></Rectangle>                        
            <StackPanel>
                <Button Style="{StaticResource ToolBtnStyle}" Content="全部关闭" Click="CloseAllClick"></Button>
                <Button Style="{StaticResource ToolBtnStyle}" Content="关闭当前" Click="CloseCurClick"></Button>
                <Button Style="{StaticResource ToolBtnStyle}" Content="关闭其他" Click="CloseOtherClick"></Button>
            </StackPanel>
            <Rectangle Width="1" Fill="{StaticResource HeadSplitor}"></Rectangle>
            <StackPanel>
                <Button Style="{StaticResource ToolBtnStyle}" Content="修改密码" Click="ChangePSWBtnClick"></Button>
                <Button Style="{StaticResource ToolBtnStyle}" Content="退出系统" Click="LoginOutBtnClick"></Button>
                <Button Style="{StaticResource ToolBtnStyle}" Content="重新登录" Click="ReLoginBtnClick"></Button>
            </StackPanel>
            <Rectangle Width="1" Fill="{StaticResource HeadSplitor}"></Rectangle>
        </StackPanel>
        <Border  Grid.Row="1" BorderBrush="#B5B5B5" BorderThickness="0 1 0 0">
            <Grid  Background="#E8E8E8" Margin="0 1 0 0" Name="CenterGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="160"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <StackPanel>
                    <sdk:Label  Height="26"  Background="#b5b5b5"  Margin="0 6 0 6"
                                FontWeight="Bold" FontSize="12" x:Name="lblMenuText" 
                                HorizontalAlignment="Center"  Width="160"  />
                    <ListBox  SelectionChanged="left_panel_SelectionChanged"  
                               ItemContainerStyle="{StaticResource ListBoxItemStyleNew}"
                               Grid.Column="0" x:Name="left_panel" Background="#E8E8E8" BorderThickness="0">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <ContentPresenter Content="{Binding MenuName}"></ContentPresenter>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
                <sdk:TabControl x:Name="tbControl" SelectionChanged="tbControl_SelectionChanged" Grid.Column="1" Margin="0 6 0 0">
                </sdk:TabControl>
            </Grid>
        </Border>
        <StackPanel Width="Auto" Grid.Row="2" 
                    Background="#B5B5B5" Orientation="Horizontal" FlowDirection="RightToLeft">
            <TextBlock VerticalAlignment="Center" Text="V1.0.0 Copy Right © All Rights Reserved"/>
            <TextBlock VerticalAlignment="Center"  Text="xxxx"/>
        </StackPanel>
    </Grid>
</UserControl>
